VxComboBox


Create a ComboBox allowing titles and labels

Syntax

VxComboBox object_name [-title title ] [-label label ] VtComboBoxArgs

Description

Creates a VtComboBox, allowing -title and -label. Returns the widget name.

Parameters

object_name
The widget hierarchy of the ComboBox.

-title
Creates a Form around the ComboBox widget and attaches a Label above it. The Label is attached to the top side of the form. The ComboBox widget is attached to the left, right and bottom sides of the Form and also to the bottom side of the Label.

-label
Creates a Form around the ComboBox widget and attaches a Label to the left side of it. The Label is attached to the top and bottom of the Form. The ComboBox widget is attached to the right, top and bottom sides of the Form.

VtComboBoxArgs
Any argument(s) legal for VtComboBox.

Example

The following code produces a ComboBox with a title.

set app [VtOpen "Demo"]
set main [VtFormDialog $app.main -title "VxComboBox Demo"]

VxComboBox $main.combobox \
	-title "Choose your favorite fruit" \
        -itemList {Apple Orange Pear Kumquat Banana Mango Guava  }  
             
VtShow $main

VtMainLoop

This code produces the following:

Notes

To get the widgetName of the Label or Form that is created using this command use VxGetVar. For example:

VxGetVar $widgetName "form"
or
VxGetVar $widgetName "label"